//获取大家都在搜

export async function getTrendingBooks(proxy) {
  try {
    const response = await proxy.$http.get('/api/book/top-search');
    const books = response.data.data.book;
    return books.slice(0, 5);
  } catch (error) {
    console.error('Error fetching trending books:', error);
    return [];
  }
}
